﻿public static class Platform
{
    public static bool isEditor
    {
        get
        {
#if UNITY_EDITOR
            return true;
#else
            return false;
#endif
        }
    }

    public static bool isWindows
    {
        get
        {
#if UNITY_STANDALONE_WIN
            return true;
#else
            return false;
#endif
        }
    }

    public static bool isOSX
    {
        get
        {
#if UNITY_STANDALONE_OSX
            return true;
#else
            return false;
#endif
        }
    }

    public static bool isAndroid
    {
        get
        {
#if UNITY_ANDROID
            return true;
#else
            return false;
#endif
        }
    }

    public static bool isIOS
    {
        get
        {
#if UNITY_IOS
            return true;
#else
            return false;
#endif
        }
    }

    public static bool isMobile
    {
        get { return UnityEngine.Application.isMobilePlatform; }
    }

    public static string name
    {
        get
        {
#if UNITY_STANDALONE_WIN
            return "Windows";
#elif UNITY_STANDALONE_OSX
                return "OSX";
#elif UNITY_STANDALONE_LINUX
                return "Linux";
#elif UNITY_IOS
                return "iOS";
#elif UNITY_ANDROID
                return "Android";
#elif UNITY_WEBGL
                return "WebGL";
#endif
        }
    }
}
